from pydantic import BaseModel


class ErrorBase(BaseModel):
    code: int
    message: str = ""


ERROR_DEFAULT_ERROR = ErrorBase(code=500, message="系统异常:")
# 找不到路径
ERROR_NOT_FOUND = ErrorBase(code=404, message="api 路径错误:")
# openai账号异常
ERROR_AI_DEFAULT_ERROR = ErrorBase(code=90000, message="系统异常:")
ERROR_AI_ACCOUNT_ERROR = ErrorBase(code=90001, message="账号异常:")
ERROR_AI_RATE_LIMIT_ERROR = ErrorBase(code=90002, message="速率限制:")
# 参数错误
ERROR_PARAMETER_ERROR = ErrorBase(code=400, message="参数错误:")

# 数据校验失败
ERROR_VALIDATE_ERROR = ErrorBase(code=20011, message="数据校验失败:")
